<template>
	<navigator class="goods-item" :url="'/pages/goods/show?id='+item.id">
		<u-image width="100%" height="300rpx" class="u-skeleton-fillet" :src="item.cover_url">
		</u-image>
		<view class="title u-line-1 u-skeleton-rect">
			{{item.title ? item.title : '商品名称'}}
		</view>
		<view class="u-flex u-row-between">
			<view class="price u-skeleton-rect">￥{{item.price ? item.price : 0}}</view>
			<view class="salse u-skeleton-rect">销量：{{item.sales ? item.sales : 0}}</view>
		</view>
	</navigator>
</template>

<script>
	export default {
		name: "goods-cards",
		props: {
			item: {
				type: Object,
				default () {
					return {}
				}
			}
		},
		data() {
			return {
			}
		},
		methods: {

		}
	}
</script>


<style lang="scss" scoped>
	.goods-item {
		padding: 30rpx;
		margin-top: 20px;
		box-shadow: 2rpx 2rpx 6rpx 0 rgba(0, 0, 0, .1);

		.title {
			margin: 10rpx 0;
			font-weight: bold;
			font-size: 32rpx;
			text-align: center;
		}

		.price {
			color: red;
			width: 40%;
		}

		.salse {
			color: #888;
			width: 40%;
		}
	}
</style>
